home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 2000 June / macformat-091.iso / Shareware Plus / Development / LitheFM Toolkit / Documentation / Importer Doc < prev    next >
Encoding:
Text File  |  2000-03-19  |  11.2 KB  |  80 lines  |  [TEXT/ttxt]

  1. Importer
  2.  
  3. Importer was designed to store import orders that are used in other Filemaker systems that you build.  Because Filemaker stores only the order of the fields in the import file when you save an import with a script, it can often be difficult to figure out which data fields are being matched up when the import is actually performed.  Importer allows you to document your imports as you set them up.  In addition, Importer can actually perform the record importing for you, which can be very useful in situations where you need to repeat a given import several times, but don't want to leave a script in the files in question (e.g. moving records from an older version of a database into a new one).
  4.  
  5. Creating an Import Record
  6.  
  7. To create a new import list:
  8. 1.  Begin by clicking on the button labelled "New Import", this will create a new record and put the cursor into the "Import Name" field.  The name you give a record should be descriptive about the import in question, something that you can use to identify the import later.
  9. 2.  You can enter the name of the script that uses this import in the field labelled "Used in Script", this can also help you to identify the import later.
  10. 3.  Any relevant comments about the import can be entered in the field labelled "Notes".
  11. 4.  Next, select the file where the data for the import will be originating by clicking on the "Select Origin" button and picking one of the files from the resulting value list.  Once you have selected a file, click on the "Update Field Info" button below the orign portal to populate that portal with the list of field names and types from the origin file.
  12. 5.  Select the destination file for the import by clicking on the "Select Destination" button and picing one of the files from the resulting value list.  Once you have selected a file, click on the "Update Field Info" button below the destination portal to populate that portal with the list of field names and types from the destination file.
  13. 6.  Begin entering the field pairs which define the import.  See the section titled "Field Pair Entry Options" for more information on how to enter field pairs.
  14. 7.  Once all the relevant field pairs have been entered, you can click on the "Print Import" button to print a report detailing the import or choose to perform the import by clicking on the "Perform Import" button.  See below for more information on performing a saved import.
  15.  
  16. Field Pair Entry Options
  17.  
  18. The Importer interface consists mainly of three portals.  A portal displaying a list of field names and types for the origin file;  a portal displaying a list of field names and types for the destination file; and a portal displaying field pairs which represent the import.  Note that Importer will not let you enter calculation fields from the destination file list into field pairs, this is because data cannot be imported into calculation fields.
  19.  
  20. There are a number of options for entering field pairs:
  21. 1.  Both the origin and destination file field list portals can be sorted by clicking on the column headers -- field name or field type.  The field pairings portal can be sorted by its column headers -- origin field or destination field.  The portal will sort and a graphic highlight will display showing you which column is the sort criteria.  Click on the header labelled "*" to unsort a portal.
  22. 2.  The most basic way to build field pairs is to click into the "origin field" field of the first row of the field pairs portal and select a field name from the pop-up list which displays, then tab into the "destination field" field and  select a field name from the pop-up list which displays.  As the field pairs portal allows the creation of related records, you can simply continue tabbing through the rows building the field pairs as you go.
  23. 3.  The another way to build field pairs is to click into a field name in the origin or destination field portal lists, the field name will highlight and if you have drag and drop text selection enabled you can simply drag the field name into the field pairs portal.  Of course, this doesn't work when you have filled up all the rows showing in the field pairs portal.  So, we included some other options.
  24. 4.  You can use the command and option keys to move a field into a specific row:
  25.                 --Hold down the option key and click on a field name and that field will be moved into the last row.
  26.                 --Hold down the command key and click on a field name and that field will be moved into the second to last row.
  27. Therefore, you can build the match pairs by holding down the option key and clicking on an origin field, then hold down the command key and clicking on a destination field.  This is probably the easiest way to build field pairs.
  28. 5.  Should you want to move all the fields from either file, simply click on the "Move All" button under the file whose fields you want to move.  They will be moved into the Field Pairings portal in the order in which they are currently sorted in their own portal.  Note that the field pairs portal must be completely clear to move all the fields for either file.
  29. 6.  Another convenient way to create field pairs is to click on the "Matching" button under the fields portal.  This will spin through the field lists for both files and create field pairs for any fields with matching names.  Note that this does not take into account the field type.  Also, the field pairs portal must be completely clear to move matching fields.
  30. 7.  You can delete a field pair by clicking on the trashcan icon on the row for that field pair.  As in all the tools in the LitheFM Toolkit, holding the option key down while you click on the trashcan icon will suppress the dialog verifying your intention.
  31. 8.  You can clear all the field pairs out of the field pairs portal by clicking on the "Clear All" button below the field pairs portal.  Holding the option key down while you click on the trashcan icon will suppress the dialog verifying your intention.
  32.  
  33. Performing a Saved Import
  34.  
  35. Importer allows you to perform an import that you have saved.  You must have both files open to perform the import.  To perform an import:
  36. 1.  Find the import you would like to perform and verify that both of the files involved are currently open on your computer.
  37. 2.  Click on the "Perform Import" button below the field pairs portal to perform the import based on the field pairs specified.
  38. 3.  There are two options available for performing imports, both are represented as check-boxes below the field name and script name fields at the top of the layout:
  39.                 --"Find All (Origin)" if this option is checked, Importer will find all the records in the file of origin before                                    performing the import.  If this option is not checked, only the current found set will be imported.
  40.                 --"Delete All (Destination)" if this option is checked, Importer will delete all the current records in the destination file before performing the import.
  41. Note that neither of these options will bring up dialogs prompting you to continue, so be sure to verify that these options are set correctly before performing an import.
  42.  
  43. Note:  Importer uses Applescript to move records one at a time from one file to the other.  This can be time-consuming and is definately slower than using Filemaker to perform the import.  However, there are times when the convenience is worth it, and Importer does not require you to have access to the import command, you just need enough access to create new records.
  44.  
  45. Buttons
  46.  
  47. "List":  Importer does not have any "find" functionality, instead clicking on this button will take you to a listing of all the import records in the database sorted by the name you gave them.  Clicking on the row for a single record will take you back to the primary layout with that record displayed.
  48.  
  49. "New Import":  This button will create a new import record and put the cursor in the "import name" field.  See "Creating an Import Record" for more information on this process.
  50.  
  51. "Select Origin":  Clicking on this button will allow you specify the origin file for the import.  If there are any field pairs specified, Importer will verify you intent before continuing.  The dialog can be suppressed by holding the option key while you specify the file.  Select an origin file will clear both the origin file fields list portal and all origin field info from the field pairs.
  52.  
  53. "Select Destination":  Clicking on this button will allow you specify the destination file for the import.  If there are any field pairs specified, Importer will verify you intent before continuing.  The dialog can be suppressed by holding the option key while you specify the file.  Select a destination file will clear both the destination file fields list portal and all destination field info from the field pairs.
  54.  
  55. "Delete":  This button deletes the current record and all its associated fields and field pairs.  Holding down the option key while you press this button will suppress the dialog verifying your intention.
  56.  
  57. "Print Import":  Clicking on this button will print a nice report detailing the current import.
  58.  
  59. (Arrow Buttons):  Use the arrow buttons to move between individual import records.  As in all LitheFM tools, holding the option key while you press these buttons will move you to the first and last records, rather then the previous or next records.
  60.  
  61. "Hide":  Just for convenience (keeps you from having to mouse up to the Window menu), pressing this button will hide the Importer and Importer Data windows.
  62.  
  63. "Close":  This button closes both the Importer and Importer Data files, but does not quit the Filemaker application.  Note that there is no dialog promping you to verify your intent, it just closes.
  64.  
  65. "Update Field Info" (Origin):  Clicking on this button will update the list of fields for the origin file.  You must have the file open to update the field names and types.  Holding down the option key while you press this button will suppress the dialog verifying your intention.
  66.  
  67. "Move All" (Origin):  This button will move all the fields from the origin fields list into the field pairs portal, in the order in which they appear in the origin fields portal.  Holding down the option key while you press this button will suppress the dialog verifying your intention.
  68.  
  69. "Perform Import" (Field Pairs):  Clicking on this button will perform the import based on the field pairs specified.  See "Performing a Saved Import" above for more information on this process.
  70.  
  71. "Matching" (Field Pairs):  This button will build field pairs for any fields with matching names.  Note that the field pairs portal must be clear to perform this function.
  72.  
  73. "Clear All" (Field Pairs):  Clicking on this button will clear all field pairs from the field pairs portal.  Holding down the option key while you press this button will suppress the dialog verifying your intention.
  74.  
  75. "Update Field Info" (Destination):  Clicking on this button will update the list of fields for the destination file.  You must have the file open to update the field names and types.  Holding down the option key while you press this button will suppress the dialog verifying your intention.
  76.  
  77. "Move All" (Origin):  This button will move all the fields from the destination fields list into the field pairs portal, in the order in which they appear in the destination fields portal.  Holding down the option key while you press this button will suppress the dialog verifying your intention.
  78.  
  79.  
  80.